home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
stay42.zip
/
STAYI21.410
< prev
next >
Wrap
Text File
|
1986-06-18
|
3KB
|
45 lines
Inline(
{; STAYI21.400}
{;-----------}
{; Routine to Set a Flag when certain INT21 functions are active.}
{; Functions to be flagged are identified in the main Stayres}
{; routine. Cf. Functab array.}
$5D { Pop Bp ; Remove Turbo Prologue}
/$5D { Pop Bp}
/$9C { PushF}
/$FB { STI ; Allow interrupts}
/$80/$FC/$62 { Cmp Ah,$62 ; Verify Max function}
/$7F/$28 { Jg SkipI21}
{; Some Int 21 functions must be left alone. They either never return,}
{; grab parameters from the stack, or can be interrupted. This code}
{; takes account of those possibilities.}
/$50 { Push Ax ; Skip functions marked 1 in}
/$53 { Push Bx ; in the function table.}
/$86/$C4 { Xchg Ah,Al}
/$BB/>FUNCTAB { Mov Bx,>FuncTab ; Test Int 21 function}
/$2E { CS:}
/$D7 { Xlat}
/$08/$C0 { Or Al,Al ; Wait for functions marked zero}
/$5B { Pop Bx ; in the function table.}
/$58 { Pop Ax}
/$75/$19 { Jnz SkipI21}
{SetI21:}
/$2E { CS:}
/$80/$0E/>INTR_FLAGS/<INT21_ON{ Or by [<Intr_flags],<INT21_on ; Say INT 21 is Active}
/$9D { PopF}
/$9C { Pushf}
/$2E { CS:}
/$FF/$1E/>DOS_INT21 { Call dw [<DOS_INT21] ; Invoke Original INT 21}
/$FB { STI ; Insure interrupts enabled}
/$9C { Pushf ; Save Return Flags}
/$2E { CS: ; Clear INT 21 Active}
/$80/$26/>INTR_FLAGS/<FOXS-INT21_ON{ And by [<Intr_flags],<Foxs-INT21_on}
/$9D { Popf ; Retrieve the flags}
/$CA/$02/$00 { RETF 2}
{SkipI21: ; Invoke Int 21 w/o return}
/$9D { PopF}
/$2E { CS:}
/$FF/$2E/>DOS_INT21 { Jmp dw [>Dos_INT21]}
{;......................................................................}
);